package Thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86186
 * Date: 2023-08-02
 * Time: 20:30
 */

class MyRunnable implements Runnable {
    @Override
    public void run() {
        System.out.println("hello thread!");
    }
}
public class ThreadDemo2 {
    public static void main(String[] args) {
        //描述任务
        MyRunnable runnable = new MyRunnable();
        //将任务交给线程去执行
        Thread t = new Thread(runnable);
        t.start();
    }
}
